/**
 * Created by LiYang on 16-9-27 下午2:07.
 */
package com.example.db;


import android.content.Context;
import com.example.db.common.EntitySerializable;
import com.example.db.common.EntityTemplate;
import com.example.db.common.SaizConstant;
import com.example.db.generate.GenerateHandler;
import com.example.db.mapper.RowMapperHandler;


public class SimpleEntityTemplate<T extends EntitySerializable> extends EntityTemplate<T> {

    private final String PK_NAME = "id";

    public SimpleEntityTemplate(Context context, Class<T> klass) {
        super(context, SaizConstant.DB_NAME, SaizConstant.DB_VERSION, klass);
    }

    public SimpleEntityTemplate(Context context,
                                GenerateHandler<T> generateHandler,
                                RowMapperHandler<T> rowMapper) {
        super(context, SaizConstant.DB_NAME, SaizConstant.DB_VERSION, generateHandler, rowMapper);
    }

    @Override
    protected String getPkName() {
        return PK_NAME;
    }
}
